package org.issaclu.springbootmybatis.role.controller;

import org.issaclu.springbootmybatis.role.dto.RoleInfo;
import org.issaclu.springbootmybatis.role.service.RoleInfoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/role")
public class RoleInfoController {

    private final RoleInfoService roleInfoService;

    public RoleInfoController(RoleInfoService roleInfoService) {
        this.roleInfoService = roleInfoService;
    }

    @GetMapping("/query")
    public List<RoleInfo> query(RoleInfo info) {
        return this.roleInfoService.query(info);
    }


}
